UnitTestException on failure
1 auto arrayRangeWithoutLength(T)(T[] array) { 2 struct ArrayRangeWithoutLength(T) { 3 private: 4 T[] array; 5 public: 6 T front() const @property { 7 return array[0]; 8 } 9 10 void popFront() { 11 array = array[1 .. $]; 12 } 13 14 bool empty() const @property { 15 return array.empty; 16 } 17 } 18 19 return ArrayRangeWithoutLength!T(array); 20 } 21 22 shouldNotBeIn(3.5, [1.1, 2.2, 4.4]); 23 shouldNotBeIn(1.0, [2.0 : 1, 3.0 : 2]); 24 shouldNotBeIn(1, arrayRangeWithoutLength([2, 3, 4]));
Verify that the value is not in the container.